/* app02-window.c
 *
 * Copyright 2024 wan-iot
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

#include "dialog-window.h"
struct _MyDialog
{
  GtkDialog  parent_instance;

  /* Template widgets */
  //GtkButton *btn_ok;
  GtkBox *dialog_box;
  GtkButtonBox *btn_box;
  GtkButton *btn_update;
  GtkButton *btn_reset;
};

G_DEFINE_TYPE (MyDialog, my_dialog, GTK_TYPE_DIALOG)

static void
my_dialog_class_init (MyDialogClass *klass)
{
  GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);

  gtk_widget_class_set_template_from_resource (widget_class, "/a/b/c/dialog-window.ui");
  //gtk_widget_class_bind_template_child (widget_class, App02Window, btn_ok);
  gtk_widget_class_bind_template_child (widget_class, MyDialog, dialog_box);
  gtk_widget_class_bind_template_child (widget_class, MyDialog, btn_box);
  gtk_widget_class_bind_template_child (widget_class, MyDialog, btn_update);
  gtk_widget_class_bind_template_child (widget_class, MyDialog, btn_reset);
  //gtk_widget_class_bind_template_child (widget_class, App02Window, btn_ok);
}

static void
my_dialog_init (MyDialog *self)
{
  GtkWidget * window = GTK_WIDGET (self);

  gtk_widget_init_template (window);
  //myDialog = self->my_dialog;
 
  //g_signal_connect (self->btn_ok, "clicked", G_CALLBACK(open), NULL);
}
